package com.poi.jms;

import java.lang.reflect.Field;

import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
import org.springframework.context.ApplicationContext;
import org.springframework.util.ObjectUtils;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.SystemPropertyUtils;
import org.xhtmlrenderer.util.SystemPropertiesUtil;

import com.poi.xml.MyTag;

public class Main {
	private String name;

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		String text = "${java.class.version}";
		System.out.println(SystemPropertyUtils.resolvePlaceholders(text));
		
		Field nameField = ReflectionUtils.findField(Main.class, "name");
		
		/*
		System.out.println(ObjectUtils.nullSafeToString(new int[]{12,44,555}));
		System.out.println(ObjectUtils.nullSafeToString(new double[]{23.01,34.55,66.00}));
		*/
	}
	
	private static void msg() {
		ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
		QueueMessageProducer messageProducer = (QueueMessageProducer)context.getBean("messageProducer");
		messageProducer.sendMsg("message");
		MyTag myTag = (MyTag)context.getBean("kittyId");
		System.out.println(myTag.getEmail());
		
	}

}
